var app = getApp()
 Page({
data: { 
 fostered_catlist: [
{ name:"流明"},
{ name:"阿狸"},
{ name:"小奶牛"},
{ name:"橙仔"},
{ name:"大头"},
{ name:"经管院三花"},
{ name:"小羊"},
{ name:"张二狗"},
{ name:"蹦蹦"},
{ name:"肥宝"},
{ name:"一千五"},
{ name:"南区大白"},
{ name:"牛牛"},
{ name:"杠杠"},
{ name:"波特"},
{ name:"噗噗"},
{ name:"团子"},
{ name:"冰冰"},
{ name:"米妮"},
{ name:"小猞猁"},
],
 unknown_catlist: [
{ name:"猴哥"},
{ name:"瘦橘白"},
{ name:"瘦奶牛"},
{ name:"小胡子"},
{ name:"华华"},
{ name:"秋秋"},
{ name:"小美狸"},
{ name:"点点"},
{ name:"块块"},
{ name:"坨坨"},
{ name:"小外套"},
],
 dead_catlist: [
{ name:"芝麻"},
{ name:"二黑"},
{ name:"大白"},
],
    screenWidth: 0,
    screenHeight: 0,
    imgwidth: 0,
    imgheight: 0,
    navbar: ['在校', '毕业', '休学', '喵星'],
    currentTab: 0,
    url: app.globalData.url_jiang,
  },
  navbarTap: function (e) {
    this.setData({
      currentTab: e.currentTarget.dataset.idx
    })
  },

  iconType: [
    'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
  ],

  onPullDownRefresh: function () {
    wx.stopPullDownRefresh()
  },

  //转发跳转页面设置
  onLoad: function (options) {
    if (options.pageId) {
      wx.navigateTo({
        url: '/pages/cats/' + options.pageId + '/' + options.pageId,
      })
    }
  },

  //转发此页面的设置
  onShareAppMessage: function (ops) {
    if (ops.from === 'button') {
      // 来自页面内转发按钮
      console.log(ops.target)
    }
    return {
      path: 'pages/index/index',  // 路径，传递参数到指定页面。
      success: function (res) {
        // 转发成功
        console.log("转发成功:" + JSON.stringify(res));
      },
      fail: function (res) {
        // 转发失败
        console.log("转发失败:" + JSON.stringify(res));
      }
    }
  },

  // 转发到朋友圈
  onShareTimeline: function (res) {
    if (ops.from === 'button') {
      // 来自页面内转发按钮
      console.log(ops.target)
    }
    return {
      path: 'pages/index/index',  // 路径，传递参数到指定页面。
      success: function (res) {
        // 转发成功
        console.log("转发成功:" + JSON.stringify(res));
      },
      fail: function (res) {
        // 转发失败
        console.log("转发失败:" + JSON.stringify(res));
      }
    }
  },

  // 搜索栏输入名字后页面跳转
  bindconfirmT: function (e) {
    console.log("e.detail.value");
    if (e.detail.value) {
      wx.navigateTo({
        url: '/pages/cats/' + e.detail.value + '/' + e.detail.value,
      })
    }
  },
  copyTBL: function (e) {
    var self = this;
    wx.setClipboardData({
      data: '南航猫协',//需要复制的内容
      success: function (res) {
        // self.setData({copyTip:true}),

      }
    })
  },

})

